package com.xbjtech.model;

import javax.validation.constraints.Pattern;

import lombok.Data;

@Data
public class User {
	/**
	 * 用户id
	 * */
	private Integer id;
	/**
	 * 用户名
	 * */
	@Pattern(regexp="(^[a-zA-Z0-9_-]{6,16}$)|(^[\u2E80-\u9FFF]{2,6})",message="error")
	private String username;
	/**
	 * 用户密码
	 * */
	@Pattern(regexp="^[a-zA-Z0-9_-]{6}$",message="error")
	private String password;
	/**
	 * 用户年龄
	 * */
	@Pattern(regexp="^[0-9_-]{1,2}$",message="error")
	private Integer age;
	public User(String username, String password, Integer age) {
		super();
		this.username = username;
		this.password = password;
		this.age = age;
	}
	public User(Integer id, String username, String password, Integer age) {
		super();
		this.id = id;
		this.username = username;
		this.password = password;
		this.age = age;
	}
	public User() {
		super();
		// TODO Auto-generated constructor stub
	}
	
	
}
